package com.liuya.shiro;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 鉴权成功后的用户令牌
 * @Author 刘亚
 * @Date 2016/12/7
 */
public class AuthenticationToken extends UsernamePasswordToken {
    private static final long serialVersionUID = 5898441540965086534L;
    private String captchaId;//默认为session id
    private String captcha;
    private String host;

    /**
     * 构建一个身份Token
     * @param username
     * @param password
     * @param captchaId
     * @param captcha
     *   验证码
     * @param rememberMe
     * @param host
     */
    public AuthenticationToken(String username, String password, boolean rememberMe, String captchaId, String captcha, String host) {
        super(username, password, rememberMe);
        this.captchaId = captchaId;
        this.captcha = captcha;
        this.host = host;
    }

    public String getHost() {
        return this.host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getCaptchaId() {
        return this.captchaId;
    }

    public void setCaptchaId(String captchaId) {
        this.captchaId = captchaId;
    }

    public String getCaptcha() {
        return this.captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }
}